# -*- coding: utf-8 -*-
# @Author   : niejiali
# @Time     : 2018/12/27 11:00
# @File     : test001.py
# @Software : PyCharm

import threading

import time


def worker():
    print('i am thread\n')
    t = threading.current_thread()
    time.sleep(100)
    print(t.getName())

t = threading.current_thread()
print(t.getName())

new_t = threading.Thread(target=worker, name='njl')
new_t.start()